#ifndef SCENEWIDGET_H
#define SCENEWIDGET_H

#include <QWidget>
#include "../external/RVO2/src/RVO.h"

QT_BEGIN_NAMESPACE
namespace Ui { class SceneWidget; }
QT_END_NAMESPACE

class GameObject;

class SceneWidget : public QWidget
{
    Q_OBJECT

public:
    SceneWidget(QWidget *parent = nullptr);
    ~SceneWidget();

    void paintEvent(QPaintEvent *) override;

    void setGameObjects(std::vector<GameObject*> gameObjects); // 设置游戏对象,只用于显示

    void mousePressEvent(QMouseEvent *event) override;
private:
    std::vector<GameObject*> _gameObjects;
    RVO::Vector2 _target;
    Ui::SceneWidget *ui;
};
#endif // SCENEWIDGET_H
